
<div class="grid_9">
   <div class="box">
      <div class="header">
      <?php echo $this->Html->image('icons/packs/fugue/16x16/shadeless/table-excel.png',
array("width" => 16, "height" => 16)); ?>
      <h3>servicios</h3><span></span>
      </div><!--end of header-->
      <div class="content">
         <table id="table-example" class="table">
            <thead>
               <tr>
                  <th>NumReg</th>
                  <th>Propietario macho</th>
                  <th>Propietario hembra</th>
                  <th>Macho</th>
                  <th>Hembra</th>
                  <th>Acciones</th>
               </tr>
            </thead><!--end of thead table-->
            <tbody>
              <?php $i = 0; ?>
              <?php foreach ($denuncias as $denuncia): ?>
                                    
              <tr <?php echo fmod($i, 2) ? "class = gradeX" : "gradeA"; ?>>
              <?php $i++; ?>
              <td class="center"><?php echo $denuncia['Servicio']['id'] ?></td>
              <td><?php echo $denuncia['Propietarioreproductor']['nombre'] ?></td>
              <td><?php echo $denuncia['Propietarioreproductora']['nombre'] ?></td>
              <td class="center"><?php echo $denuncia['Reproductor']['nombre'] ?></td>
              <td class="center"><?php echo $denuncia['Reproductora']['nombre'] ?></td>
              <td>
              <?php
    if ($denuncia['Monta']['id'] != null) {
        echo $this->Html->link($this->Html->image("icons/packs/diagona/16x16/049.png",
            array("alt" => "Monta", 'title' => "ver monta")), array('action' => "vermonta",
                $denuncia['Monta']['id']), array('escape' => false));
        echo $this->Html->link($this->Html->image("icons/packs/diagona/16x16/018.png",
            array("alt" => "Monta", 'title' => "editar monta")), array('action' =>
                "editarmonta", $denuncia['Monta']['id']), array('escape' => false));
    }
?>
              &nbsp;
              <?php echo $this->Html->link($this->Html->image("icons/packs/diagona/16x16/049.png",
    array("alt" => "ver", 'title' => "ver servicio")), array('action' => "ver", $denuncia['Servicio']['id']),
        array('escape' => false)); ?>
              &nbsp;
              &nbsp;
              <?php
    echo $this->Html->link($this->Html->image("icons/packs/diagona/16x16/018.png",
        array("alt" => "Editar", 'title' => "editar servicio")), array('action' =>
            "editarservicio", $denuncia['Servicio']['id']), array('escape' => false));
?>
              &nbsp;
               
              <?php echo $this->Html->link($this->Html->image("icons/packs/diagona/16x16/101.png",
    array("title" => "eliminar")), array('action' => "eliminar", $denuncia['Servicio']['id']),
        array('escape' => false), ('Desea realmente eliminar?')); ?>
              &nbsp;
              <?php
    echo $this->Html->link($this->Html->image("icons/packs/diagona/16x16/062.png",
        array("title" => "imprimir")), array('action' => 'imprimir', $denuncia['Servicio']['id']),
        array('escape' => false)); ?>
              &nbsp;
              <?php if ($denuncia['Denuncianacimiento']['servicio_id'] == null): ?>
              <?php
        echo $this->Html->link($this->Html->image("icons/packs/diagona/16x16/002.png",
            array("title" => "registrar nacimiento")), array(
            'action' => 'denuncia',
            'controller' => 'dnacimiento',
            $denuncia['Servicio']['id']), array('escape' => false)); ?>
              <?php else: ?>
              <?php
        echo $this->Html->link($this->Html->image("icons/packs/diagona/16x16/164.png",
            array("title" => "ver nacimiento")), array(
            'action' => 'ver',
            'controller' => 'dnacimiento',
            $denuncia['Denuncianacimiento']['id']), array('escape' => false)); ?>
              <?php
        //debug($denuncia['Denuncianacimiento']['id']);
        if ($denuncia['Camada']['id'] == null) {
            echo $this->Html->link($this->Html->image("dogver.png", array("title" =>
                    "registrar camada")), array(
                'controller' => 'Denunciaservicio',
                'action' => 'registrarcamada',
                $denuncia['Servicio']['id'],
                $denuncia['Denuncianacimiento']['id']), array('escape' => false));
        } else {
            echo $this->Html->link($this->Html->image("dog.png", array("title" =>
                    "ver datos camada")), array(
                'controller' => 'Denunciaservicio',
                'action' => 'vercamada',
                $denuncia['Camada']['id']), array('escape' => false));
            echo $this->Html->link($this->Html->image("dog.png", array("title" =>
                    "registrar informe de comicion cria")), array(
                'controller' => 'Denunciaservicio',
                'action' => 'informecomision',
                $denuncia['Camada']['id']), array('escape' => false));

        }

?>
              <?php endif; ?>
              </td>
              </tr>
              <?php endforeach; ?>
            </tbody>
         </table><!--end of table-->
      </div><!--end of content-->
      <div class="clear"></div>
   </div><!--end of box-->
</div><!--end of grid 12 contendedor tabla-->
<div class="grid_3">
      <?php echo $this->element('menu_servicios') ?>
</div> <!-- End of .grid_4 -->
<div class="clear"></div> 

<script>
      $(window).load(function() {
        $('#table-example').dataTable();
        $(window).resize();
      });
</script>